package monitor.basic;

import java.util.ArrayList;
import java.util.List;

import monitor.inference.InferenceEngine;
import monitor.transmission.Transmitter;

public class Recorder {

	private List<Activity> activities = new ArrayList<Activity>();
	private InferenceEngine engine;
	private Transmitter transmitter;

	public void record(String event) {
	}

	public void record(Activity activity) {
		if (this.engine != null)
			this.engine.addActivity(activity);
		if (this.transmitter != null)
			this.transmitter.send(activity);
		// this.getActivities().add(activity);
	}

	public void addToEngine(Activity activity) {
		if (this.engine != null)
			this.engine.addActivity(activity);
	}

	public void transmit(Activity activity) {
		if (this.transmitter != null)
			this.transmitter.send(activity);
	}

	public List<Activity> getActivities() {
		return activities;
	}

	public void setEngine(InferenceEngine engine) {
		this.engine = engine;
	}

	public void setTransmitter(Transmitter transmitter) {
		this.transmitter = transmitter;
	}
}
